<div class="navbar navbar-default navbar-static-top" ng-controller="NavbarCtrl">
  <div class="container">
    <div class="navbar-header">
      <button class="navbar-toggle" type="button" ng-click="isCollapsed = !isCollapsed">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="/" class="navbar-brand">宁波市城乡规划委员会会议投票系统后台</a>
    </div>
    <div collapse="isCollapsed" class="navbar-collapse collapse" id="navbar-main">
      <ul class="nav navbar-nav">
        <li ng-repeat="item in menu" ng-class="{active: isActive(item.link)}">
            <a ng-href="{{item.link}}">{{item.title}}</a>
        </li>
        <li ng-show="isAdmin()" ng-class="{active: isActive('/cp/meeting/list')}"><a href="/cp/meeting/list">会议</a></li>
      </ul>

      <ul class="nav navbar-nav navbar-right">
        <li ng-hide="isLoggedIn()" ng-class="{active: isActive('/login')}"><a href="/login">登陆</a></li>
        <li ng-show="isLoggedIn()"><p class="navbar-text">你好 {{ getCurrentUser().name }}</p> </li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('/settings')}"><a href="/settings">设置</a></li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('/logout')}"><a href="" ng-click="logout()">注销</a></li>
      </ul>
    </div>
  </div>
</div>
